package com.zdb.demo.design.pattern.behavioral.strategy;

import org.apache.commons.lang3.StringUtils;

public class Test2 {
    public static void main(String[] args) {

        String promotionKey = "LIJIAN";

        PromotionActivity promotionActivity = null;

        if(StringUtils.equals(promotionKey, "LIJIAN")) {
            promotionActivity = new PromotionActivity(new LijianPromotionStrategy());
        } else if(StringUtils.equals(promotionKey, "MANJIAN")) {
            promotionActivity = new PromotionActivity(new ManjianPromotionStrategy());
        } // ....

        promotionActivity.executePromotionStrategy();

    }
}
